<template>
	<view class="video-page">
		<channel-live :finder-user-name="sph" :feed-id="feedId">
		</channel-live>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sph: 'sphGLoqXlzQ3Yv6',
				feedId: null
			}
		},
		onLoad() {
		},
		onShow() {
			const _this = this
			uni.getStorage({
				key: 'userInfo',
				success: function(res) {
					if (res.data) {
						const arr = []
						const file = res.data.portrait.split(',')
						_this.userInfo = res.data
						//getChannelsLiveInfo
						wx.getChannelsLiveInfo({
							finderUserName: _this.sph,
							success: res => {
								_this.feedId = res.feedId
							},
							fail: res => {
								console.error(res);
							}
						});
						wx.getChannelsLiveNoticeInfo({
							finderUserName: _this.sph,
							// startTime: new Date("2023-12-06").getTime(),
							// endTime: new Date("2023-12-07").getTime(),
							success: function(res) {
								console.log(res)
								// debugger
							},
							fail: function(res) {
								console.log(res)
								// debugger
							},
							complete: function(res) {}
						})
					}
				},
				fail: function(res) {
					uni.navigateTo({
						url: '../login/login'
					});
				}
			})

		},
		created() {},
		mounted() {},
		methods: {}
	}
</script>

<style>
	.video-page {}
</style>
<style lang="scss">
</style>